/**
 * 
 */
package cn.biplam.front.template.callback;

import cn.biplam.front.htmlscript.script.AjxScript;
import cn.biplam.front.htmlscript.script.AjxScript.Level;

/**
 * 通讯脚本绑定回调类
 * @author 	WangSong 2009-6-6 下午02:52:47
 * @version 1.0
 */
public  class AjxScriptBind {
	
	/**
	 * Ajx通讯脚本目标容器
	 */
	public enum Ajx_Target{
		Self,
		Domain,
		Popop1,
		Popop2,
		Popop3,
		Popop4,
		Popop5,
		Popop6,
		Popop7,
		Prompt;
	}
	
	private Ajx_Target target;
	
	public AjxScriptBind(Ajx_Target target){
		this.target=target;
	}
	
	public String get(String containerID,String actionID,String recordID){
		switch(this.target){
		case Popop1:
			AjxScript.getP(containerID, actionID, Level.First, null);
		case Prompt:
			AjxScript.getPr(containerID, actionID, null, null);
		case Domain:
			AjxScript.getM(containerID, actionID, recordID, "domain");
		case Self:
			AjxScript.getA(containerID, actionID, recordID);
		}
		return null;
	}
}
